package qldc.pm.tienan.model.impl;

import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler;
import com.liferay.portal.kernel.util.GetterUtil;
import com.liferay.portal.kernel.util.ProxyUtil;
import com.liferay.portal.kernel.util.StringBundler;
import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.model.CacheModel;
import com.liferay.portal.model.impl.BaseModelImpl;
import com.liferay.portal.service.ServiceContext;

import com.liferay.portlet.expando.model.ExpandoBridge;
import com.liferay.portlet.expando.util.ExpandoBridgeFactoryUtil;

import qldc.pm.tienan.model.LichAnXoaAnTich;
import qldc.pm.tienan.model.LichAnXoaAnTichModel;

import java.io.Serializable;

import java.sql.Types;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * The base model implementation for the LichAnXoaAnTich service. Represents a row in the &quot;TS_LichAnXoaAnTich&quot; database table, with each column mapped to a property of this class.
 *
 * <p>
 * This implementation and its corresponding interface {@link qldc.pm.tienan.model.LichAnXoaAnTichModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link LichAnXoaAnTichImpl}.
 * </p>
 *
 * @author Brian Wing Shun Chan
 * @see LichAnXoaAnTichImpl
 * @see qldc.pm.tienan.model.LichAnXoaAnTich
 * @see qldc.pm.tienan.model.LichAnXoaAnTichModel
 * @generated
 */
public class LichAnXoaAnTichModelImpl extends BaseModelImpl<LichAnXoaAnTich>
    implements LichAnXoaAnTichModel {
    /*
     * NOTE FOR DEVELOPERS:
     *
     * Never modify or reference this class directly. All methods that expect a lich an xoa an tich model instance should use the {@link qldc.pm.tienan.model.LichAnXoaAnTich} interface instead.
     */
    public static final String TABLE_NAME = "TS_LichAnXoaAnTich";
    public static final Object[][] TABLE_COLUMNS = {
            { "lichAnXoaAnTichId", Types.BIGINT },
            { "tienAnId", Types.BIGINT },
            { "nguoiLapHoSoXoaAnTichId", Types.BIGINT },
            { "ngayLapHoSoXoaAnTich", Types.TIMESTAMP },
            { "nguoiYeuCauXoaAnTich", Types.VARCHAR },
            { "ngayYeuCauXoaAnTich", Types.TIMESTAMP },
            { "nguoiThucHienXoaAnTichTrongDuLieuID", Types.BIGINT },
            { "ngayKyDuyetXoaAnTich", Types.TIMESTAMP },
            { "maHoSoXoaAnTich", Types.VARCHAR },
            { "chuThich", Types.VARCHAR },
            { "kinhGui", Types.VARCHAR },
            { "hinhPhat", Types.VARCHAR },
            { "coQuanThiHanhAn", Types.VARCHAR },
            { "soQuyetDinhThiHanhAn", Types.VARCHAR },
            { "ngayQuyetDinhThiHanhAn", Types.TIMESTAMP },
            { "hoVaTenDoiTuongTienAn", Types.VARCHAR }
        };
    public static final String TABLE_SQL_CREATE = "create table TS_LichAnXoaAnTich (lichAnXoaAnTichId LONG not null primary key,tienAnId LONG,nguoiLapHoSoXoaAnTichId LONG,ngayLapHoSoXoaAnTich DATE null,nguoiYeuCauXoaAnTich VARCHAR(75) null,ngayYeuCauXoaAnTich DATE null,nguoiThucHienXoaAnTichTrongDuLieuID LONG,ngayKyDuyetXoaAnTich DATE null,maHoSoXoaAnTich VARCHAR(75) null,chuThich VARCHAR(75) null,kinhGui VARCHAR(75) null,hinhPhat VARCHAR(75) null,coQuanThiHanhAn VARCHAR(75) null,soQuyetDinhThiHanhAn VARCHAR(75) null,ngayQuyetDinhThiHanhAn DATE null,hoVaTenDoiTuongTienAn VARCHAR(75) null)";
    public static final String TABLE_SQL_DROP = "drop table TS_LichAnXoaAnTich";
    public static final String ORDER_BY_JPQL = " ORDER BY lichAnXoaAnTich.lichAnXoaAnTichId DESC";
    public static final String ORDER_BY_SQL = " ORDER BY TS_LichAnXoaAnTich.lichAnXoaAnTichId DESC";
    public static final String DATA_SOURCE = "liferayDataSource";
    public static final String SESSION_FACTORY = "liferaySessionFactory";
    public static final String TX_MANAGER = "liferayTransactionManager";
    public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
                "value.object.entity.cache.enabled.qldc.pm.tienan.model.LichAnXoaAnTich"),
            true);
    public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
                "value.object.finder.cache.enabled.qldc.pm.tienan.model.LichAnXoaAnTich"),
            true);
    public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
                "value.object.column.bitmask.enabled.qldc.pm.tienan.model.LichAnXoaAnTich"),
            true);
    public static long HOVATENDOITUONGTIENAN_COLUMN_BITMASK = 1L;
    public static long MAHOSOXOAANTICH_COLUMN_BITMASK = 2L;
    public static long NGAYYEUCAUXOAANTICH_COLUMN_BITMASK = 4L;
    public static long TIENANID_COLUMN_BITMASK = 8L;
    public static long LICHANXOAANTICHID_COLUMN_BITMASK = 16L;
    public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.util.service.ServiceProps.get(
                "lock.expiration.time.qldc.pm.tienan.model.LichAnXoaAnTich"));
    private static ClassLoader _classLoader = LichAnXoaAnTich.class.getClassLoader();
    private static Class<?>[] _escapedModelInterfaces = new Class[] {
            LichAnXoaAnTich.class
        };
    private long _lichAnXoaAnTichId;
    private long _tienAnId;
    private long _originalTienAnId;
    private boolean _setOriginalTienAnId;
    private long _nguoiLapHoSoXoaAnTichId;
    private Date _ngayLapHoSoXoaAnTich;
    private String _nguoiYeuCauXoaAnTich;
    private Date _ngayYeuCauXoaAnTich;
    private Date _originalNgayYeuCauXoaAnTich;
    private long _nguoiThucHienXoaAnTichTrongDuLieuID;
    private Date _ngayKyDuyetXoaAnTich;
    private String _maHoSoXoaAnTich;
    private String _originalMaHoSoXoaAnTich;
    private String _chuThich;
    private String _kinhGui;
    private String _hinhPhat;
    private String _coQuanThiHanhAn;
    private String _soQuyetDinhThiHanhAn;
    private Date _ngayQuyetDinhThiHanhAn;
    private String _hoVaTenDoiTuongTienAn;
    private String _originalHoVaTenDoiTuongTienAn;
    private long _columnBitmask;
    private LichAnXoaAnTich _escapedModel;

    public LichAnXoaAnTichModelImpl() {
    }

    @Override
    public long getPrimaryKey() {
        return _lichAnXoaAnTichId;
    }

    @Override
    public void setPrimaryKey(long primaryKey) {
        setLichAnXoaAnTichId(primaryKey);
    }

    @Override
    public Serializable getPrimaryKeyObj() {
        return _lichAnXoaAnTichId;
    }

    @Override
    public void setPrimaryKeyObj(Serializable primaryKeyObj) {
        setPrimaryKey(((Long) primaryKeyObj).longValue());
    }

    @Override
    public Class<?> getModelClass() {
        return LichAnXoaAnTich.class;
    }

    @Override
    public String getModelClassName() {
        return LichAnXoaAnTich.class.getName();
    }

    @Override
    public Map<String, Object> getModelAttributes() {
        Map<String, Object> attributes = new HashMap<String, Object>();

        attributes.put("lichAnXoaAnTichId", getLichAnXoaAnTichId());
        attributes.put("tienAnId", getTienAnId());
        attributes.put("nguoiLapHoSoXoaAnTichId", getNguoiLapHoSoXoaAnTichId());
        attributes.put("ngayLapHoSoXoaAnTich", getNgayLapHoSoXoaAnTich());
        attributes.put("nguoiYeuCauXoaAnTich", getNguoiYeuCauXoaAnTich());
        attributes.put("ngayYeuCauXoaAnTich", getNgayYeuCauXoaAnTich());
        attributes.put("nguoiThucHienXoaAnTichTrongDuLieuID",
            getNguoiThucHienXoaAnTichTrongDuLieuID());
        attributes.put("ngayKyDuyetXoaAnTich", getNgayKyDuyetXoaAnTich());
        attributes.put("maHoSoXoaAnTich", getMaHoSoXoaAnTich());
        attributes.put("chuThich", getChuThich());
        attributes.put("kinhGui", getKinhGui());
        attributes.put("hinhPhat", getHinhPhat());
        attributes.put("coQuanThiHanhAn", getCoQuanThiHanhAn());
        attributes.put("soQuyetDinhThiHanhAn", getSoQuyetDinhThiHanhAn());
        attributes.put("ngayQuyetDinhThiHanhAn", getNgayQuyetDinhThiHanhAn());
        attributes.put("hoVaTenDoiTuongTienAn", getHoVaTenDoiTuongTienAn());

        return attributes;
    }

    @Override
    public void setModelAttributes(Map<String, Object> attributes) {
        Long lichAnXoaAnTichId = (Long) attributes.get("lichAnXoaAnTichId");

        if (lichAnXoaAnTichId != null) {
            setLichAnXoaAnTichId(lichAnXoaAnTichId);
        }

        Long tienAnId = (Long) attributes.get("tienAnId");

        if (tienAnId != null) {
            setTienAnId(tienAnId);
        }

        Long nguoiLapHoSoXoaAnTichId = (Long) attributes.get(
                "nguoiLapHoSoXoaAnTichId");

        if (nguoiLapHoSoXoaAnTichId != null) {
            setNguoiLapHoSoXoaAnTichId(nguoiLapHoSoXoaAnTichId);
        }

        Date ngayLapHoSoXoaAnTich = (Date) attributes.get(
                "ngayLapHoSoXoaAnTich");

        if (ngayLapHoSoXoaAnTich != null) {
            setNgayLapHoSoXoaAnTich(ngayLapHoSoXoaAnTich);
        }

        String nguoiYeuCauXoaAnTich = (String) attributes.get(
                "nguoiYeuCauXoaAnTich");

        if (nguoiYeuCauXoaAnTich != null) {
            setNguoiYeuCauXoaAnTich(nguoiYeuCauXoaAnTich);
        }

        Date ngayYeuCauXoaAnTich = (Date) attributes.get("ngayYeuCauXoaAnTich");

        if (ngayYeuCauXoaAnTich != null) {
            setNgayYeuCauXoaAnTich(ngayYeuCauXoaAnTich);
        }

        Long nguoiThucHienXoaAnTichTrongDuLieuID = (Long) attributes.get(
                "nguoiThucHienXoaAnTichTrongDuLieuID");

        if (nguoiThucHienXoaAnTichTrongDuLieuID != null) {
            setNguoiThucHienXoaAnTichTrongDuLieuID(nguoiThucHienXoaAnTichTrongDuLieuID);
        }

        Date ngayKyDuyetXoaAnTich = (Date) attributes.get(
                "ngayKyDuyetXoaAnTich");

        if (ngayKyDuyetXoaAnTich != null) {
            setNgayKyDuyetXoaAnTich(ngayKyDuyetXoaAnTich);
        }

        String maHoSoXoaAnTich = (String) attributes.get("maHoSoXoaAnTich");

        if (maHoSoXoaAnTich != null) {
            setMaHoSoXoaAnTich(maHoSoXoaAnTich);
        }

        String chuThich = (String) attributes.get("chuThich");

        if (chuThich != null) {
            setChuThich(chuThich);
        }

        String kinhGui = (String) attributes.get("kinhGui");

        if (kinhGui != null) {
            setKinhGui(kinhGui);
        }

        String hinhPhat = (String) attributes.get("hinhPhat");

        if (hinhPhat != null) {
            setHinhPhat(hinhPhat);
        }

        String coQuanThiHanhAn = (String) attributes.get("coQuanThiHanhAn");

        if (coQuanThiHanhAn != null) {
            setCoQuanThiHanhAn(coQuanThiHanhAn);
        }

        String soQuyetDinhThiHanhAn = (String) attributes.get(
                "soQuyetDinhThiHanhAn");

        if (soQuyetDinhThiHanhAn != null) {
            setSoQuyetDinhThiHanhAn(soQuyetDinhThiHanhAn);
        }

        Date ngayQuyetDinhThiHanhAn = (Date) attributes.get(
                "ngayQuyetDinhThiHanhAn");

        if (ngayQuyetDinhThiHanhAn != null) {
            setNgayQuyetDinhThiHanhAn(ngayQuyetDinhThiHanhAn);
        }

        String hoVaTenDoiTuongTienAn = (String) attributes.get(
                "hoVaTenDoiTuongTienAn");

        if (hoVaTenDoiTuongTienAn != null) {
            setHoVaTenDoiTuongTienAn(hoVaTenDoiTuongTienAn);
        }
    }

    @Override
    public long getLichAnXoaAnTichId() {
        return _lichAnXoaAnTichId;
    }

    @Override
    public void setLichAnXoaAnTichId(long lichAnXoaAnTichId) {
        _columnBitmask = -1L;

        _lichAnXoaAnTichId = lichAnXoaAnTichId;
    }

    @Override
    public long getTienAnId() {
        return _tienAnId;
    }

    @Override
    public void setTienAnId(long tienAnId) {
        _columnBitmask |= TIENANID_COLUMN_BITMASK;

        if (!_setOriginalTienAnId) {
            _setOriginalTienAnId = true;

            _originalTienAnId = _tienAnId;
        }

        _tienAnId = tienAnId;
    }

    public long getOriginalTienAnId() {
        return _originalTienAnId;
    }

    @Override
    public long getNguoiLapHoSoXoaAnTichId() {
        return _nguoiLapHoSoXoaAnTichId;
    }

    @Override
    public void setNguoiLapHoSoXoaAnTichId(long nguoiLapHoSoXoaAnTichId) {
        _nguoiLapHoSoXoaAnTichId = nguoiLapHoSoXoaAnTichId;
    }

    @Override
    public Date getNgayLapHoSoXoaAnTich() {
        return _ngayLapHoSoXoaAnTich;
    }

    @Override
    public void setNgayLapHoSoXoaAnTich(Date ngayLapHoSoXoaAnTich) {
        _ngayLapHoSoXoaAnTich = ngayLapHoSoXoaAnTich;
    }

    @Override
    public String getNguoiYeuCauXoaAnTich() {
        if (_nguoiYeuCauXoaAnTich == null) {
            return StringPool.BLANK;
        } else {
            return _nguoiYeuCauXoaAnTich;
        }
    }

    @Override
    public void setNguoiYeuCauXoaAnTich(String nguoiYeuCauXoaAnTich) {
        _nguoiYeuCauXoaAnTich = nguoiYeuCauXoaAnTich;
    }

    @Override
    public Date getNgayYeuCauXoaAnTich() {
        return _ngayYeuCauXoaAnTich;
    }

    @Override
    public void setNgayYeuCauXoaAnTich(Date ngayYeuCauXoaAnTich) {
        _columnBitmask |= NGAYYEUCAUXOAANTICH_COLUMN_BITMASK;

        if (_originalNgayYeuCauXoaAnTich == null) {
            _originalNgayYeuCauXoaAnTich = _ngayYeuCauXoaAnTich;
        }

        _ngayYeuCauXoaAnTich = ngayYeuCauXoaAnTich;
    }

    public Date getOriginalNgayYeuCauXoaAnTich() {
        return _originalNgayYeuCauXoaAnTich;
    }

    @Override
    public long getNguoiThucHienXoaAnTichTrongDuLieuID() {
        return _nguoiThucHienXoaAnTichTrongDuLieuID;
    }

    @Override
    public void setNguoiThucHienXoaAnTichTrongDuLieuID(
        long nguoiThucHienXoaAnTichTrongDuLieuID) {
        _nguoiThucHienXoaAnTichTrongDuLieuID = nguoiThucHienXoaAnTichTrongDuLieuID;
    }

    @Override
    public Date getNgayKyDuyetXoaAnTich() {
        return _ngayKyDuyetXoaAnTich;
    }

    @Override
    public void setNgayKyDuyetXoaAnTich(Date ngayKyDuyetXoaAnTich) {
        _ngayKyDuyetXoaAnTich = ngayKyDuyetXoaAnTich;
    }

    @Override
    public String getMaHoSoXoaAnTich() {
        if (_maHoSoXoaAnTich == null) {
            return StringPool.BLANK;
        } else {
            return _maHoSoXoaAnTich;
        }
    }

    @Override
    public void setMaHoSoXoaAnTich(String maHoSoXoaAnTich) {
        _columnBitmask |= MAHOSOXOAANTICH_COLUMN_BITMASK;

        if (_originalMaHoSoXoaAnTich == null) {
            _originalMaHoSoXoaAnTich = _maHoSoXoaAnTich;
        }

        _maHoSoXoaAnTich = maHoSoXoaAnTich;
    }

    public String getOriginalMaHoSoXoaAnTich() {
        return GetterUtil.getString(_originalMaHoSoXoaAnTich);
    }

    @Override
    public String getChuThich() {
        if (_chuThich == null) {
            return StringPool.BLANK;
        } else {
            return _chuThich;
        }
    }

    @Override
    public void setChuThich(String chuThich) {
        _chuThich = chuThich;
    }

    @Override
    public String getKinhGui() {
        if (_kinhGui == null) {
            return StringPool.BLANK;
        } else {
            return _kinhGui;
        }
    }

    @Override
    public void setKinhGui(String kinhGui) {
        _kinhGui = kinhGui;
    }

    @Override
    public String getHinhPhat() {
        if (_hinhPhat == null) {
            return StringPool.BLANK;
        } else {
            return _hinhPhat;
        }
    }

    @Override
    public void setHinhPhat(String hinhPhat) {
        _hinhPhat = hinhPhat;
    }

    @Override
    public String getCoQuanThiHanhAn() {
        if (_coQuanThiHanhAn == null) {
            return StringPool.BLANK;
        } else {
            return _coQuanThiHanhAn;
        }
    }

    @Override
    public void setCoQuanThiHanhAn(String coQuanThiHanhAn) {
        _coQuanThiHanhAn = coQuanThiHanhAn;
    }

    @Override
    public String getSoQuyetDinhThiHanhAn() {
        if (_soQuyetDinhThiHanhAn == null) {
            return StringPool.BLANK;
        } else {
            return _soQuyetDinhThiHanhAn;
        }
    }

    @Override
    public void setSoQuyetDinhThiHanhAn(String soQuyetDinhThiHanhAn) {
        _soQuyetDinhThiHanhAn = soQuyetDinhThiHanhAn;
    }

    @Override
    public Date getNgayQuyetDinhThiHanhAn() {
        return _ngayQuyetDinhThiHanhAn;
    }

    @Override
    public void setNgayQuyetDinhThiHanhAn(Date ngayQuyetDinhThiHanhAn) {
        _ngayQuyetDinhThiHanhAn = ngayQuyetDinhThiHanhAn;
    }

    @Override
    public String getHoVaTenDoiTuongTienAn() {
        if (_hoVaTenDoiTuongTienAn == null) {
            return StringPool.BLANK;
        } else {
            return _hoVaTenDoiTuongTienAn;
        }
    }

    @Override
    public void setHoVaTenDoiTuongTienAn(String hoVaTenDoiTuongTienAn) {
        _columnBitmask |= HOVATENDOITUONGTIENAN_COLUMN_BITMASK;

        if (_originalHoVaTenDoiTuongTienAn == null) {
            _originalHoVaTenDoiTuongTienAn = _hoVaTenDoiTuongTienAn;
        }

        _hoVaTenDoiTuongTienAn = hoVaTenDoiTuongTienAn;
    }

    public String getOriginalHoVaTenDoiTuongTienAn() {
        return GetterUtil.getString(_originalHoVaTenDoiTuongTienAn);
    }

    public long getColumnBitmask() {
        return _columnBitmask;
    }

    @Override
    public ExpandoBridge getExpandoBridge() {
        return ExpandoBridgeFactoryUtil.getExpandoBridge(0,
            LichAnXoaAnTich.class.getName(), getPrimaryKey());
    }

    @Override
    public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
        ExpandoBridge expandoBridge = getExpandoBridge();

        expandoBridge.setAttributes(serviceContext);
    }

    @Override
    public LichAnXoaAnTich toEscapedModel() {
        if (_escapedModel == null) {
            _escapedModel = (LichAnXoaAnTich) ProxyUtil.newProxyInstance(_classLoader,
                    _escapedModelInterfaces, new AutoEscapeBeanHandler(this));
        }

        return _escapedModel;
    }

    @Override
    public Object clone() {
        LichAnXoaAnTichImpl lichAnXoaAnTichImpl = new LichAnXoaAnTichImpl();

        lichAnXoaAnTichImpl.setLichAnXoaAnTichId(getLichAnXoaAnTichId());
        lichAnXoaAnTichImpl.setTienAnId(getTienAnId());
        lichAnXoaAnTichImpl.setNguoiLapHoSoXoaAnTichId(getNguoiLapHoSoXoaAnTichId());
        lichAnXoaAnTichImpl.setNgayLapHoSoXoaAnTich(getNgayLapHoSoXoaAnTich());
        lichAnXoaAnTichImpl.setNguoiYeuCauXoaAnTich(getNguoiYeuCauXoaAnTich());
        lichAnXoaAnTichImpl.setNgayYeuCauXoaAnTich(getNgayYeuCauXoaAnTich());
        lichAnXoaAnTichImpl.setNguoiThucHienXoaAnTichTrongDuLieuID(getNguoiThucHienXoaAnTichTrongDuLieuID());
        lichAnXoaAnTichImpl.setNgayKyDuyetXoaAnTich(getNgayKyDuyetXoaAnTich());
        lichAnXoaAnTichImpl.setMaHoSoXoaAnTich(getMaHoSoXoaAnTich());
        lichAnXoaAnTichImpl.setChuThich(getChuThich());
        lichAnXoaAnTichImpl.setKinhGui(getKinhGui());
        lichAnXoaAnTichImpl.setHinhPhat(getHinhPhat());
        lichAnXoaAnTichImpl.setCoQuanThiHanhAn(getCoQuanThiHanhAn());
        lichAnXoaAnTichImpl.setSoQuyetDinhThiHanhAn(getSoQuyetDinhThiHanhAn());
        lichAnXoaAnTichImpl.setNgayQuyetDinhThiHanhAn(getNgayQuyetDinhThiHanhAn());
        lichAnXoaAnTichImpl.setHoVaTenDoiTuongTienAn(getHoVaTenDoiTuongTienAn());

        lichAnXoaAnTichImpl.resetOriginalValues();

        return lichAnXoaAnTichImpl;
    }

    @Override
    public int compareTo(LichAnXoaAnTich lichAnXoaAnTich) {
        int value = 0;

        if (getLichAnXoaAnTichId() < lichAnXoaAnTich.getLichAnXoaAnTichId()) {
            value = -1;
        } else if (getLichAnXoaAnTichId() > lichAnXoaAnTich.getLichAnXoaAnTichId()) {
            value = 1;
        } else {
            value = 0;
        }

        value = value * -1;

        if (value != 0) {
            return value;
        }

        return 0;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }

        if (!(obj instanceof LichAnXoaAnTich)) {
            return false;
        }

        LichAnXoaAnTich lichAnXoaAnTich = (LichAnXoaAnTich) obj;

        long primaryKey = lichAnXoaAnTich.getPrimaryKey();

        if (getPrimaryKey() == primaryKey) {
            return true;
        } else {
            return false;
        }
    }

    @Override
    public int hashCode() {
        return (int) getPrimaryKey();
    }

    @Override
    public void resetOriginalValues() {
        LichAnXoaAnTichModelImpl lichAnXoaAnTichModelImpl = this;

        lichAnXoaAnTichModelImpl._originalTienAnId = lichAnXoaAnTichModelImpl._tienAnId;

        lichAnXoaAnTichModelImpl._setOriginalTienAnId = false;

        lichAnXoaAnTichModelImpl._originalNgayYeuCauXoaAnTich = lichAnXoaAnTichModelImpl._ngayYeuCauXoaAnTich;

        lichAnXoaAnTichModelImpl._originalMaHoSoXoaAnTich = lichAnXoaAnTichModelImpl._maHoSoXoaAnTich;

        lichAnXoaAnTichModelImpl._originalHoVaTenDoiTuongTienAn = lichAnXoaAnTichModelImpl._hoVaTenDoiTuongTienAn;

        lichAnXoaAnTichModelImpl._columnBitmask = 0;
    }

    @Override
    public CacheModel<LichAnXoaAnTich> toCacheModel() {
        LichAnXoaAnTichCacheModel lichAnXoaAnTichCacheModel = new LichAnXoaAnTichCacheModel();

        lichAnXoaAnTichCacheModel.lichAnXoaAnTichId = getLichAnXoaAnTichId();

        lichAnXoaAnTichCacheModel.tienAnId = getTienAnId();

        lichAnXoaAnTichCacheModel.nguoiLapHoSoXoaAnTichId = getNguoiLapHoSoXoaAnTichId();

        Date ngayLapHoSoXoaAnTich = getNgayLapHoSoXoaAnTich();

        if (ngayLapHoSoXoaAnTich != null) {
            lichAnXoaAnTichCacheModel.ngayLapHoSoXoaAnTich = ngayLapHoSoXoaAnTich.getTime();
        } else {
            lichAnXoaAnTichCacheModel.ngayLapHoSoXoaAnTich = Long.MIN_VALUE;
        }

        lichAnXoaAnTichCacheModel.nguoiYeuCauXoaAnTich = getNguoiYeuCauXoaAnTich();

        String nguoiYeuCauXoaAnTich = lichAnXoaAnTichCacheModel.nguoiYeuCauXoaAnTich;

        if ((nguoiYeuCauXoaAnTich != null) &&
                (nguoiYeuCauXoaAnTich.length() == 0)) {
            lichAnXoaAnTichCacheModel.nguoiYeuCauXoaAnTich = null;
        }

        Date ngayYeuCauXoaAnTich = getNgayYeuCauXoaAnTich();

        if (ngayYeuCauXoaAnTich != null) {
            lichAnXoaAnTichCacheModel.ngayYeuCauXoaAnTich = ngayYeuCauXoaAnTich.getTime();
        } else {
            lichAnXoaAnTichCacheModel.ngayYeuCauXoaAnTich = Long.MIN_VALUE;
        }

        lichAnXoaAnTichCacheModel.nguoiThucHienXoaAnTichTrongDuLieuID = getNguoiThucHienXoaAnTichTrongDuLieuID();

        Date ngayKyDuyetXoaAnTich = getNgayKyDuyetXoaAnTich();

        if (ngayKyDuyetXoaAnTich != null) {
            lichAnXoaAnTichCacheModel.ngayKyDuyetXoaAnTich = ngayKyDuyetXoaAnTich.getTime();
        } else {
            lichAnXoaAnTichCacheModel.ngayKyDuyetXoaAnTich = Long.MIN_VALUE;
        }

        lichAnXoaAnTichCacheModel.maHoSoXoaAnTich = getMaHoSoXoaAnTich();

        String maHoSoXoaAnTich = lichAnXoaAnTichCacheModel.maHoSoXoaAnTich;

        if ((maHoSoXoaAnTich != null) && (maHoSoXoaAnTich.length() == 0)) {
            lichAnXoaAnTichCacheModel.maHoSoXoaAnTich = null;
        }

        lichAnXoaAnTichCacheModel.chuThich = getChuThich();

        String chuThich = lichAnXoaAnTichCacheModel.chuThich;

        if ((chuThich != null) && (chuThich.length() == 0)) {
            lichAnXoaAnTichCacheModel.chuThich = null;
        }

        lichAnXoaAnTichCacheModel.kinhGui = getKinhGui();

        String kinhGui = lichAnXoaAnTichCacheModel.kinhGui;

        if ((kinhGui != null) && (kinhGui.length() == 0)) {
            lichAnXoaAnTichCacheModel.kinhGui = null;
        }

        lichAnXoaAnTichCacheModel.hinhPhat = getHinhPhat();

        String hinhPhat = lichAnXoaAnTichCacheModel.hinhPhat;

        if ((hinhPhat != null) && (hinhPhat.length() == 0)) {
            lichAnXoaAnTichCacheModel.hinhPhat = null;
        }

        lichAnXoaAnTichCacheModel.coQuanThiHanhAn = getCoQuanThiHanhAn();

        String coQuanThiHanhAn = lichAnXoaAnTichCacheModel.coQuanThiHanhAn;

        if ((coQuanThiHanhAn != null) && (coQuanThiHanhAn.length() == 0)) {
            lichAnXoaAnTichCacheModel.coQuanThiHanhAn = null;
        }

        lichAnXoaAnTichCacheModel.soQuyetDinhThiHanhAn = getSoQuyetDinhThiHanhAn();

        String soQuyetDinhThiHanhAn = lichAnXoaAnTichCacheModel.soQuyetDinhThiHanhAn;

        if ((soQuyetDinhThiHanhAn != null) &&
                (soQuyetDinhThiHanhAn.length() == 0)) {
            lichAnXoaAnTichCacheModel.soQuyetDinhThiHanhAn = null;
        }

        Date ngayQuyetDinhThiHanhAn = getNgayQuyetDinhThiHanhAn();

        if (ngayQuyetDinhThiHanhAn != null) {
            lichAnXoaAnTichCacheModel.ngayQuyetDinhThiHanhAn = ngayQuyetDinhThiHanhAn.getTime();
        } else {
            lichAnXoaAnTichCacheModel.ngayQuyetDinhThiHanhAn = Long.MIN_VALUE;
        }

        lichAnXoaAnTichCacheModel.hoVaTenDoiTuongTienAn = getHoVaTenDoiTuongTienAn();

        String hoVaTenDoiTuongTienAn = lichAnXoaAnTichCacheModel.hoVaTenDoiTuongTienAn;

        if ((hoVaTenDoiTuongTienAn != null) &&
                (hoVaTenDoiTuongTienAn.length() == 0)) {
            lichAnXoaAnTichCacheModel.hoVaTenDoiTuongTienAn = null;
        }

        return lichAnXoaAnTichCacheModel;
    }

    @Override
    public String toString() {
        StringBundler sb = new StringBundler(33);

        sb.append("{lichAnXoaAnTichId=");
        sb.append(getLichAnXoaAnTichId());
        sb.append(", tienAnId=");
        sb.append(getTienAnId());
        sb.append(", nguoiLapHoSoXoaAnTichId=");
        sb.append(getNguoiLapHoSoXoaAnTichId());
        sb.append(", ngayLapHoSoXoaAnTich=");
        sb.append(getNgayLapHoSoXoaAnTich());
        sb.append(", nguoiYeuCauXoaAnTich=");
        sb.append(getNguoiYeuCauXoaAnTich());
        sb.append(", ngayYeuCauXoaAnTich=");
        sb.append(getNgayYeuCauXoaAnTich());
        sb.append(", nguoiThucHienXoaAnTichTrongDuLieuID=");
        sb.append(getNguoiThucHienXoaAnTichTrongDuLieuID());
        sb.append(", ngayKyDuyetXoaAnTich=");
        sb.append(getNgayKyDuyetXoaAnTich());
        sb.append(", maHoSoXoaAnTich=");
        sb.append(getMaHoSoXoaAnTich());
        sb.append(", chuThich=");
        sb.append(getChuThich());
        sb.append(", kinhGui=");
        sb.append(getKinhGui());
        sb.append(", hinhPhat=");
        sb.append(getHinhPhat());
        sb.append(", coQuanThiHanhAn=");
        sb.append(getCoQuanThiHanhAn());
        sb.append(", soQuyetDinhThiHanhAn=");
        sb.append(getSoQuyetDinhThiHanhAn());
        sb.append(", ngayQuyetDinhThiHanhAn=");
        sb.append(getNgayQuyetDinhThiHanhAn());
        sb.append(", hoVaTenDoiTuongTienAn=");
        sb.append(getHoVaTenDoiTuongTienAn());
        sb.append("}");

        return sb.toString();
    }

    @Override
    public String toXmlString() {
        StringBundler sb = new StringBundler(52);

        sb.append("<model><model-name>");
        sb.append("qldc.pm.tienan.model.LichAnXoaAnTich");
        sb.append("</model-name>");

        sb.append(
            "<column><column-name>lichAnXoaAnTichId</column-name><column-value><![CDATA[");
        sb.append(getLichAnXoaAnTichId());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>tienAnId</column-name><column-value><![CDATA[");
        sb.append(getTienAnId());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>nguoiLapHoSoXoaAnTichId</column-name><column-value><![CDATA[");
        sb.append(getNguoiLapHoSoXoaAnTichId());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>ngayLapHoSoXoaAnTich</column-name><column-value><![CDATA[");
        sb.append(getNgayLapHoSoXoaAnTich());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>nguoiYeuCauXoaAnTich</column-name><column-value><![CDATA[");
        sb.append(getNguoiYeuCauXoaAnTich());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>ngayYeuCauXoaAnTich</column-name><column-value><![CDATA[");
        sb.append(getNgayYeuCauXoaAnTich());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>nguoiThucHienXoaAnTichTrongDuLieuID</column-name><column-value><![CDATA[");
        sb.append(getNguoiThucHienXoaAnTichTrongDuLieuID());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>ngayKyDuyetXoaAnTich</column-name><column-value><![CDATA[");
        sb.append(getNgayKyDuyetXoaAnTich());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>maHoSoXoaAnTich</column-name><column-value><![CDATA[");
        sb.append(getMaHoSoXoaAnTich());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>chuThich</column-name><column-value><![CDATA[");
        sb.append(getChuThich());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>kinhGui</column-name><column-value><![CDATA[");
        sb.append(getKinhGui());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>hinhPhat</column-name><column-value><![CDATA[");
        sb.append(getHinhPhat());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>coQuanThiHanhAn</column-name><column-value><![CDATA[");
        sb.append(getCoQuanThiHanhAn());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>soQuyetDinhThiHanhAn</column-name><column-value><![CDATA[");
        sb.append(getSoQuyetDinhThiHanhAn());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>ngayQuyetDinhThiHanhAn</column-name><column-value><![CDATA[");
        sb.append(getNgayQuyetDinhThiHanhAn());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>hoVaTenDoiTuongTienAn</column-name><column-value><![CDATA[");
        sb.append(getHoVaTenDoiTuongTienAn());
        sb.append("]]></column-value></column>");

        sb.append("</model>");

        return sb.toString();
    }
}
